﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Company.Infrastructure;
using Company.Web.Infrastructure;

namespace Company.Web.Model
{
    public class AccountView:IAccountView
    {
        public AccountView()
        {
            TypeUser = new ComboBox();
        }

        [Required(ErrorMessage = ValidationErrors.Required)]
        [StringLength(20, ErrorMessage = ValidationErrors.StringLenghtMax)]
        [ValidateStringLength(6, ErrorMessage = ValidationErrors.StringLenghtMin)]
        [DisplayName("Nombre de Usuario")]
        public string UserName { get; set; }

        [Required(ErrorMessage = ValidationErrors.Required)]
        [StringLength(20, ErrorMessage = ValidationErrors.StringLenghtMax)]
        [ValidateStringLength(7, ErrorMessage = ValidationErrors.StringLenghtMin)]
        [DisplayName("Contraseña")]
        public string Password { get; set; }

        [Required(ErrorMessage = ValidationErrors.Required)]
        [StringLength(20, ErrorMessage = ValidationErrors.StringLenghtMax)]
        [ValidateStringLength(7, ErrorMessage = ValidationErrors.StringLenghtMin)]
        [DisplayName("Repetir Contraseña")]
        public string NewPassword { get; set; }


        [Required(ErrorMessage = ValidationErrors.Required)]
        [DataType(DataType.EmailAddress,ErrorMessage = ValidationErrors.DataTypeEmail)]
        [DisplayName("Correo Electronico")]
        public string Email { get; set; }

        [DisplayName("Tipo de Usuario")]
        public IComboBox TypeUser { get; set; }
    }
}
